﻿using Dyao.Book.Contract;

namespace Dyao.Book.Application.Abstractions
{
    public interface ITaskCenterRuleApplication
    {
        /// <summary>
        /// 获取任务中心规则列表
        /// </summary>
        /// <param name="idList">idList</param>
        /// <param name="cancellationToken">cancellationToken</param>
        /// <returns></returns>
        Task<List<TaskCenterRuleDto>> GetTaskCenterRuleModelListAsync(List<int> idList, CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取所有规则
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<List<TaskCenterRuleDto>> GetListAsync(CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取规则执行器的配置信息
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<List<TaskCenterRuleExecutorSettingInfoDto>> GetAllRuleExecutorSettingInfoListAsync(CancellationToken cancellationToken = default);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task AddAsync(TaskCenterRuleAddOrEditDto model, CancellationToken cancellationToken = default);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="model"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task EditAsync(TaskCenterRuleAddOrEditDto model, CancellationToken cancellationToken = default);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task DeleteAsync(int id, CancellationToken cancellationToken = default);
    }
}
